Do not use GtkBoxChild in GtkStatusBar
authorJavier Jardón <jjardon@gnome.org>
Wed, 14 Jul 2010 22:46:22 +0000 (00:46 +0200)
committerJavier Jardón <jjardon@gnome.org>
Tue, 20 Jul 2010 00:35:49 +0000 (02:35 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=624397

gtk/gtkstatusbar.c

index 350a034e6c8c0a7da991dd36066917f8237a0fb7..f6972f99b0b2a15cc484a690925a4bcd0542ee97 100644 (file)
@@ -1031,8 +1031,9 @@ static gboolean
 has_extra_children (GtkStatusbar *statusbar)
 {
   GtkStatusbarPriv *priv = statusbar->priv;
+  GtkPackType child_pack_type, frame_pack_type;
+  GtkWidget *child, *frame;
   GList *l, *children;
-  GtkBoxChild *child, *frame;
 
   /* If the internal frame has been modified assume we have extra children */
   if (gtk_bin_get_child (GTK_BIN (priv->frame)) != priv->label)
@@ -1044,18 +1045,24 @@ has_extra_children (GtkStatusbar *statusbar)
     {
       frame = l->data;
 
-      if (frame->widget == priv->frame)
+      if (frame == priv->frame)
        break;
     }
-  
+
+  gtk_box_query_child_packing (GTK_BOX (statusbar), frame,
+                               NULL, NULL, NULL, &frame_pack_type);
+
   for (l = l->next; l; l = l->next)
     {
       child = l->data;
 
-      if (!gtk_widget_get_visible (child->widget))
+      if (!gtk_widget_get_visible (child))
        continue;
 
-      if (frame->pack == GTK_PACK_START || child->pack == GTK_PACK_END)
+      gtk_box_query_child_packing (GTK_BOX (statusbar), frame,
+                                   NULL, NULL, NULL, &child_pack_type);
+
+      if (frame_pack_type == GTK_PACK_START || child_pack_type == GTK_PACK_END)
        return TRUE;
     }